package main

import (
	"demo01/count"
	"fmt"
)

type Animaler interface {
	SetName(string)
	GetName() string
}

type Dog struct {
	Name string
}

func (d *Dog) SetName(name string) {
	d.Name = name
}

func (d *Dog) GetName() string {
	return d.Name
}

type Cat struct {
	Name string
}

func (c *Cat) SetName(name string) {
	c.Name = name
}

func (c *Cat) GetName() string {
	return c.Name
}

func main() {
	fmt.Println("hello word")
	const a int = 1
	const b int = 2
	c := count.Add(a, b)
	fmt.Println(c)
	d := count.Sum(a, b)
	fmt.Println(d)

	var cat = &Cat{
		Name: "毛毛",
	}

	var c1 Animaler = cat
	c1.SetName("大牛")
	fmt.Println(c1.GetName())

}
